package com.yu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yu.bean.Employee;
import com.yu.dao.EmployeeDAO;
import com.yu.service.EmployeeService;

@Service
public class EmployeeServiceImpl implements EmployeeService {

	@Autowired
	private EmployeeDAO employeeDAO;

	@Override
	public int add(Employee employee) {
		return employeeDAO.add(employee);
	}

	@Override
	public int update(Employee employee) {
		return employeeDAO.update(employee);
	}

	@Override
	public int delete(int id) {
		return employeeDAO.delete(id);
	}

	@Override
	public List<Employee> getAll() {
		return employeeDAO.getAll();
	}

	@Override
	public List<Employee> getAllWithDept() {
		return employeeDAO.getAllWithDept();
	}

	@Override
	public Employee getById(int id) {
		return employeeDAO.getById(id);
	}


}
